/**
 * @param {string} num1
 * @param {string} num2
 * @return {string}
 */
var addStrings = function (num1, num2) {
  let arr1=num1.split(''),arr2=num2.split(''),carry=0,arr3=[]
  while(arr1.length>0 || arr2.length>0 || carry){ 
    let a = arr1.length>0?arr1.pop()-0:0
    let b = arr2.length>0? arr2.pop()-0:0
    let sum = (a+b+carry)%10
    carry = Math.floor((a+b+carry)/10)
    arr3.push(sum)
  }
  return arr3
};

addStrings('11','123')